/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Table;

/**
 *
 * @author Administrator
 */
public class HeadUnit {

    private boolean editable;
    private boolean needComboBox;
    private String name;
    private String type;
    private boolean visiable;
    private boolean notnull;
    private int columnWidth;

    public int getColumnWidth() {
        return columnWidth;
    }

    public void setColumnWidth(int columnWidth) {
        this.columnWidth = columnWidth;
    }

    public boolean isNotnull() {
        return notnull;
    }

    public void setNotnull(boolean notnull) {
        this.notnull = notnull;
    }
    

    public boolean isVisiable() {
        return visiable;
    }

    public void setVisiable(boolean visiable) {
        this.visiable = visiable;
    }
    

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isNeedComboBox() {
        return needComboBox;
    }

    public void setNeedComboBox(boolean needComboBox) {
        this.needComboBox = needComboBox;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public HeadUnit(boolean editable, boolean needComboBox, String name) {
        this.editable = editable;
        this.needComboBox = needComboBox;
        this.name = name;
//        this.type = type;
    }

    public HeadUnit(String name) {
        this.editable = true;
        this.needComboBox = false;
        this.name = name;
        this.visiable = true;
        this.columnWidth = 50;
        this.notnull = false;
    }

    private HeadUnit() {
    }

    public static HeadUnit getInstance() {
        return HeadUnitHolder.INSTANCE;
    }

    private static class HeadUnitHolder {
        private static final HeadUnit INSTANCE = new HeadUnit();
    }
 }
